'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);

  // 登录
  router.post('/api/login', controller.login.login)

  // 获取用户信息
  router.get('/api/getUserInfo', controller.login.getUserInfo)

  // 模拟数据
  router.get('/api/mock', controller.home.mock)

  // 获取list
  router.post('/api/getList', controller.home.getList)

  // 获取详情
  router.post('/api/getDetail', controller.home.getDetail)
};
